package com.bjsxt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2021-10-14
 */
@TableName("t_host")
public class Host extends Model<Host> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "hid", type = IdType.AUTO)
    private Integer hid;

    private String hname;

    private String hpwd;

    private String hphone;

    private LocalDateTime starttime;

    private String status;

    public Host() {
    }

    private String strong;

    private Integer ordernumber;

    @TableField(exist = false)
    private HostPower hostPower;

    @Override
    public String toString() {
        return "Host{" +
                "hid=" + hid +
                ", hname='" + hname + '\'' +
                ", hpwd='" + hpwd + '\'' +
                ", hphone='" + hphone + '\'' +
                ", starttime=" + starttime +
                ", status='" + status + '\'' +
                ", strong='" + strong + '\'' +
                ", ordernumber=" + ordernumber +
                ", hostPower=" + hostPower +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Host host = (Host) o;
        return Objects.equals(hid, host.hid) && Objects.equals(hname, host.hname) && Objects.equals(hpwd, host.hpwd) && Objects.equals(hphone, host.hphone) && Objects.equals(starttime, host.starttime) && Objects.equals(status, host.status) && Objects.equals(strong, host.strong) && Objects.equals(ordernumber, host.ordernumber) && Objects.equals(hostPower, host.hostPower);
    }

    @Override
    public int hashCode() {
        return Objects.hash(hid, hname, hpwd, hphone, starttime, status, strong, ordernumber, hostPower);
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public HostPower getHostPower() {
        return hostPower;
    }

    public void setHostPower(HostPower hostPower) {
        this.hostPower = hostPower;
    }

    public Host(Integer hid, String hname, String hpwd, String hphone, LocalDateTime starttime, String status, String strong, Integer ordernumber, HostPower hostPower) {
        this.hid = hid;
        this.hname = hname;
        this.hpwd = hpwd;
        this.hphone = hphone;
        this.starttime = starttime;
        this.status = status;
        this.strong = strong;
        this.ordernumber = ordernumber;
        this.hostPower = hostPower;
    }




    public Integer getHid() {
        return hid;
    }

    public void setHid(Integer hid) {
        this.hid = hid;
    }

    public String getHname() {
        return hname;
    }

    public void setHname(String hname) {
        this.hname = hname;
    }

    public String getHpwd() {
        return hpwd;
    }

    public void setHpwd(String hpwd) {
        this.hpwd = hpwd;
    }

    public String getHphone() {
        return hphone;
    }

    public void setHphone(String hphone) {
        this.hphone = hphone;
    }

    public LocalDateTime getStarttime() {
        return starttime;
    }

    public void setStarttime(LocalDateTime starttime) {
        this.starttime = starttime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStrong() {
        return strong;
    }

    public void setStrong(String strong) {
        this.strong = strong;
    }

    public Integer getOrdernumber() {
        return ordernumber;
    }

    public void setOrdernumber(Integer ordernumber) {
        this.ordernumber = ordernumber;
    }

    @Override
    protected Serializable pkVal() {
        return this.hid;
    }

}
